package com.ruoyi.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.mapper.DutyMapper;
import com.ruoyi.domain.Duty;
import com.ruoyi.service.IDutyService;

/**
 * dutyService业务层处理
 * 
 * @author ya
 * @date 2025-08-17
 */
@Service
public class DutyServiceImpl extends ServiceImpl<DutyMapper,Duty> implements IDutyService
{
    @Autowired
    private DutyMapper dutyMapper;

    /**
     * 查询duty
     * 
     * @param id duty主键
     * @return duty
     */
    @Override
    public Duty selectDutyById(Long id)
    {
        return dutyMapper.selectDutyById(id);
    }

    /**
     * 查询duty列表
     * 
     * @param duty duty
     * @return duty
     */
    @Override
    public List<Duty> selectDutyList(Duty duty)
    {
        return dutyMapper.selectDutyList(duty);
    }

    /**
     * 新增duty
     * 
     * @param duty duty
     * @return 结果
     */
    @Override
    public int insertDuty(Duty duty)
    {
        return dutyMapper.insertDuty(duty);
    }

    /**
     * 修改duty
     * 
     * @param duty duty
     * @return 结果
     */
    @Override
    public int updateDuty(Duty duty)
    {
        return dutyMapper.updateDuty(duty);
    }

    /**
     * 批量删除duty
     * 
     * @param ids 需要删除的duty主键
     * @return 结果
     */
    @Override
    public int deleteDutyByIds(Long[] ids)
    {
        return dutyMapper.deleteDutyByIds(ids);
    }

    /**
     * 删除duty信息
     * 
     * @param id duty主键
     * @return 结果
     */
    @Override
    public int deleteDutyById(Long id)
    {
        return dutyMapper.deleteDutyById(id);
    }
}
